Direct Motion

In direct motion, the stars are orbitting the main galaxy $M$ in the same direction of motion of the disrupting galaxy $S$. To determine the velocity of a particle along its path, a velocity vector is drawn on the circle at a point and using trigonometry and the components, the $x$- and $y$-velocities are found to be $v_x = vsin(\theta)$ and $v_y = -vcos(\theta)$.


In [1]:
%matplotlib inline
import matplotlib.pyplot as plt;
import numpy as np;
import seaborn as sns;
import timeit;
from scipy.integrate import odeint;
from IPython.html.widgets import interact, fixed;
from moviepy.video.io.bindings import mplfig_to_npimage;
import moviepy.editor as mpy;


:0: FutureWarning: IPython widgets are experimental and may change in the future.
WARNING:py.warnings:/usr/local/lib/python3.4/dist-packages/skimage/filter/__init__.py:6: skimage_deprecation: The `skimage.filter` module has been renamed to `skimage.filters`.  This placeholder module will be removed in v0.13.
  warn(skimage_deprecation('The `skimage.filter` module has been renamed '

Constants


In [2]:
gamma = 4.4983169634398597e4
tsteps = 1000
t = np.linspace(0,1.5,tsteps)
M = 10
S = 10
whichplot='direct'

Function Imports


In [3]:
from derivsfunc import *
from initialconditions import *
from solutions import ode_solutions
from staticplotter import *
from directmoviemaker import *;


Calling functions to ensure all variables and whatever else is available


In [4]:
direct_ic(M,gamma)
parabolic_ic(M,S,gamma)
ics(M,S,gamma)
ode_solutions(t,tsteps,M,S,gamma);

Static plots at different time intervals

Note: This is not a representation of the entire time frame. These plots show the disrupting galaxy and a few of it's after effects.

In the direct passage case, we can see that the stars get sucked into an orbit around $S$ while most of the stars remain near $M$. This is most likely due to the motion of the stars and $S$ are in the same direction, allowing the stars to continue with little effort. We can also see some spiral arms forming as $S$ passes by in the fifth and sixth frames.


In [5]:
plot_static(t,whichplot, tsteps, M, S, gamma)


Visualization of the Motion


In [6]:
direct_animation.ipython_display(fps=60)



Out[6]: